import 'package:hi_net/http/request/hi_base_request.dart';

import '../../const/Const.dart';
import '../dao/login_dao.dart';
///基础请求
abstract class BaseRequest extends HiBaseRequest{

  @override
  String authority() {
    return "api.devio.org";
  }

  @override
  String url() {

    if (needLogin()) {
      //给需要登录的接口携带登录的令牌
      addHeader(LoginDao.BOARDING_PASS, LoginDao.getBoardingPass());
    }

    return super.url();
  }

  Map<String, dynamic> get header => Const.header;

}
